package com.sf;

import java.util.ArrayList;
import java.util.List;

public class DS {

    public static void main(String[] args) {
        CustomStack<Integer> customStack = new CustomStack<Integer>();
        customStack.push(2);
        customStack.push(5);
        customStack.push(1);

        System.out.println(customStack.pop());

        customStack.printAll();


        LinkList linkList = new LinkList();
        linkList.add(1);
        linkList.add(4);
        linkList.add(9);
        linkList.add(5);
        linkList.printAll();
        int b = linkList.pop();
        System.out.println(b);
        linkList.printAll();


        List<String> list = new ArrayList<>();
        // 假设列表已有数据
        list.add("Element2");
        list.add("Element3");

        // 在开头插入数据
        list.add(0, "Element1");

        System.out.println(list);
    }
}
